AUTOMAKE_OPTIONS = cygnus

INCLUDES = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) 
AM_CCASFLAGS = $(INCLUDES)

SUBDIRS = net stdlib
SUBLIBS = net/lib.a stdlib/lib.a

GENERAL_SOURCES = \
	syscalls.c \
	jmp.S 	\
	signal.c \
	socket.c \
	unix/getut.c

ADD_OBJS = $(SUBLIBS)

noinst_LIBRARIES = lib.a
lib_a_SOURCES = $(GENERAL_SOURCES)
lib_a_LIBADD = $(ADD_OBJS)
lib_a_DEPENDENCIES = $(ADD_OBJS)
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
LIBC_COMPILE = $(COMPILE)
noinst_DATA =

lib.a : $(lib_a_OBJECTS)
	rm -f $@
	rm -fr tmp
	mkdir tmp
	cp $^ tmp
	cd tmp; \
	for i in $(SUBLIBS); do	\
		$(AR) x ../$$i;	\
	done;	\
	$(AR) $(AR_FLAGS) ../$@ *.o $^
	$(RANLIB) $@
	rm -fr tmp

if MAY_SUPPLY_SYSCALLS
all: crt0.o
endif


AM_CFLAGS = -I $(srcdir)/../../stdio
ACLOCAL_AMFLAGS = -I ../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
